package com.example.searchenginebackend.common;

/**
 * 错误码枚举类
 * @author 米饭好好吃
 */
public enum ErrorCode {
    PARAMS_NULL(400, "请求参数为空！"),
    PARAMS_ERROR(400, "请求参数错误！"),
    NO_LOGIN(401, "用户未登录！"),
    NO_AUTH(401, "无权限访问！")
    ;
    private int code;
    private String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
